package com.xiaoyy.core.dict.gateway.controller;

import com.xiaoyy.core.common.vo.*;
import com.xiaoyy.core.config.util.RedisUtil;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 缓存管理
 *
 * @author chenzh
 * @date 2019-112-10
 */
@RestController
@RequestMapping(value = "/cache")
public class CacheContorller {
    @Autowired
    RedisUtil redisUtil;
    /**
     * 分页查询数据字典信息
     */
    @PostMapping(value = "/clear/all", produces = "application/json;charset=UTF-8")
    @ApiOperation(value = "清除所有缓存", notes = "清除所有缓存")
    public AppResponse clearAll() {
        redisUtil.clearAll();
        return AppResponse.successData("清除成功");
    }

}
